package com.htandroid.htandroid.tools;

import android.text.TextUtils;

import java.text.SimpleDateFormat;

/**
 * Created by caihuixing on 2017/9/1.
 */

public class MyStringUtil {

    public static final String TIME_FORMAT_ONE = "yyyy-MM-dd";

    public static boolean isEmpty(String string) {
        if (TextUtils.isEmpty(string) || TextUtils.isEmpty(string.trim())) {
            return true;
        }
        return false;
    }

    public static boolean equals(String s1, String s2) {
        return TextUtils.equals(s1, s2);
    }

    /**
     * 根据毫秒值 获取时间字符串
     */
    public static String getTimeStr(long time, String format) {
        return new SimpleDateFormat(format).format(time);
    }
}
